package com.studyspace.model;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
import java.util.Date;

/**
 * @Author liujilong
 * @Project study-space
 * @File UserModel
 * @Date 2021/11/26 11:00 下午
 **/
public class UserModel {

    @ApiModelProperty(value = "姓名")
    @NotBlank(message = "姓名不能为空")
    private String name;

    @ApiModelProperty(value = "性别")
    private String gender;

    @ApiModelProperty(value = "年龄")
    private Integer age;

    @ApiModelProperty(value = "电话")
    @Size(min = 11, max = 11, message = "手机号码长度不正确")
    @Pattern(regexp = "^(((13[0-9])|(14[579])|(15([0-9]))|(16[6])|(17[0135678])|(18[0-9])|(19[89]))\\d{8})$", message = "手机号格式错误")
    private String phone;

    @ApiModelProperty(value = "密码")
    private String password;

    @ApiModelProperty(value = "邮箱")
//    @Pattern(regexp = )
    @NotBlank(message = "邮箱不能为空")
    private String email;

    @ApiModelProperty(value = "职业")
    private String profession;

    @ApiModelProperty(value = "头像")
    private String icon;

    @ApiModelProperty(value = "居住地")
    private String residence;

    @ApiModelProperty(value = "学校")
    private String school;

    @ApiModelProperty(value = "角色")
    private Long roleId;

}
